import request from '@/utils/request'

export function getUserByPage(data) {
  return request({
    url: '/sys/sysuser_search',
    method: 'post',
    data,
  })
}

export function getUserById(id) {
  return request({
    url: '/sys/sysuser_detail',
    method: 'get',
    data: {
      id,
    },
  })
}

export function createUser(data) {
  return request({
    url: '/sys/sysuser_save',
    method: 'post',
    data,
  })
}

export function updateUser(data) {
  return request({
    url: '/sys/sysuser_update',
    method: 'post',
    data,
  })
}

export function deleteUser(id) {
  return request({
    url: '/sys/sysuser_delete',
    method: 'get',
    params: {
      id,
    },
  })
}

export function deleteUserByIds(ids) {
  return request({
    url: '/sys/sysuser_deletebyids',
    method: 'get',
    params: {
      ids,
    },
  })
}
